package chapter3.test11;

import java.io.IOException;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

import org.junit.Before;
import org.junit.Test;

public class CalcSUmTest {
	Calulator calculator;
	String numFilepath;
	@Before public void setUp(){
		this.calculator = new Calulator();
		this.numFilepath  =  getClass().getResource("number.txt").getPath();
	}
	@Test
	public void sumOfNumbers() throws IOException{
		assertThat( calculator.calcSum(this.numFilepath),is(10));
	}
	@Test
	public void mutiplyOfNumbers() throws IOException{
		assertThat( calculator.calcMutiply(this.numFilepath),is(24));
	}

}
